<?php
class Application_Model_Schema_ActionValueResource extends Application_Model_Schema_Resource {
	protected $_rate;
	protected $_value;

	public function __set($name, $value) {
		$method = 'set' . $name;
		if(!method_exists($this, $method)) {
			throw new Exception('Set Invalid ActionValueResource Property');
		}
		$this->$method($value);
	}

	public function __get($name) {
		$method = 'get' . $name;
		if(!method_exists($this, $method)) {
			throw new Exception('Get Invalid ActionValueResource Property');
		}
		return $this->$method();
	}

	public function setRate($rate) {
		if(isset($rate)) {
			$rate = (float) $rate;
		}
		$this->_rate = $rate;
		return $this;
	}

	public function getRate() {
		return $this->_rate;
	}

	public function setValue($value) {
		if(isset($value)) {
			$value = (int) $value;
		}
		
		$this->_value = $value;
		return $this;
	}

	public function getValue() {
		return $this->_value;
	}	
}
?>